﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XUtility
{
    /// <summary>
    /// WebAPI路由格式类
    /// </summary>
    public class ApiRoute
    {
        /// <summary>
        /// 路由格式初始化，默认是GET方式
        /// </summary>
        /// <param name="p_route">路由地址，如果有分页参数，请不要填写在这里</param>
        /// <param name="p_method">默认是GET请求，其他情况是使用ApiMethod点出来</param>
        public ApiRoute(String p_route = "", String p_method = "GET")
        {
            Method = p_method;
            Route = p_route;
        }
        /// <summary>
        /// 请求方式
        /// </summary>
        public String Method { get; set; }
        /// <summary>
        /// 路由地址
        /// </summary>
        public String Route { get; set; }
    }

    /// <summary>
    /// WebAPI请求方式
    /// </summary>
    public struct ApiMethod
    {
        public const String GET = "GET";
        public const String POST = "POST";
        public const String PUT = "PUT";
        public const String DELETE = "DELETE";
    }
}
